package com.chao.deeply.future;

import java.util.concurrent.CompletableFuture;

/**
 * @author : Rookie
 * @description :
 * @date : 2023/5/13
 */
public class CompleteTableFutureTest {

    public static void main(String[] args) {
        CompletableFuture.runAsync(() -> {
            System.out.println(Thread.currentThread().getName());
        }).whenComplete((t,u) -> {
            System.out.println(t);
            System.out.println(u);
        }).exceptionally(e -> {
            e.printStackTrace();
            return null;
        });
    }
}
